/**
 * Created by changshuiwang on 2016/7/25.
 */
$(function(){
    $(".form-horizontal").submit(function(){
        var data=$(".form-horizontal").serialize();
        $.ajax({
            data:data,
            type:"POST",
            url:"/site/update",
            dataType:"json",
            success:function(msg){
                if(msg.status=="success") {
                    alert("更新成功");
                    window.location.href = "/site/info";
                }else{
                    alert(msg.error);
                }
            }
        });
        return false;
    })
})